import java.io.*;
import java.util.*;
import java.text.*;
public class TraceConversor {
	public static void main(String[] args) throws Exception {
//		double mult = Double.parseDouble(args[0]);
		BufferedReader bf = new BufferedReader( new InputStreamReader( System.in ) );
		String line = bf.readLine();
		while(line != null) {
			
			StringTokenizer st = new StringTokenizer(line);
			String first = st.nextToken();
			double second = (Double.parseDouble(st.nextToken()));
			second = second * 1024 * 1024 / 8;
			System.out.println(first + " " + (long)second);
			line = bf.readLine();
		}
	}
}
